Generally, when a semi join operator is executed in a query plan, the right side operators of the semi joined are closed once a qualified row for the semi join operator is found. In a model where the query plan is a tree of operators, it is relatively straightforward for the system to distinguish which operators are the right side operators of a semi join operator in order to close them. However, if the query plan is generated into a native access plan and further compiled into an intermediate representation language (such as that used by a Low-Level Virtual Machine (LLVM)) or native binary code, the system may not be able to determine which operators are the right side operators of a semi join operator. Thus, when the query plan is in an intermediate representation language, the system may not be able to close the right side operators when a qualified row is found.
In the drawings, like reference numbers generally indicate identical or similar elements. Additionally, generally, the left-most digit(s) of a reference number identifies the drawing in which the reference number first appears.